package cn.xiyue.production.network;

import java.util.Map;

import cn.xiyue.production.bean.Car;
import cn.xiyue.production.bean.Factory;
import cn.xiyue.production.bean.Material;
import cn.xiyue.production.bean.Person;
import cn.xiyue.production.bean.Position;
import cn.xiyue.production.bean.Store;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface RequestApi {

    String baseUrl = "http://sxy.verineliu.com:8080/Interface/";

    @POST("Person/getAll")
    Call<ResponseData<Person>> getAllPerson();

    @POST("UserFactory/getInfo")
    Call<ResponseData<Factory>> getFactoryInfo(@Query("id") int id);

    @GET("UserFactoryEnvironmentalLog/search")
    Call<ResponseData<Factory>> setLighting(@Query("isLighting") int isLighting);

    @GET("UserFactory/updateAcSwitch")
    Call<ResponseData<Factory>> updateAcSwitch(@Query("id") int id, @Query("acSwitch") int acSwitch);

    @GET("index/getMaterial")
    Call<ResponseData<Material>> getMaterial();

    @GET("UserQuality/getAll")
    Call<ResponseData<Car>> getAllCar();

    @GET("UserCarStore/getAll")
    Call<ResponseData<Store>> getAllStore();

    @GET("index/addUserMaterialStore")
    Call<ResponseStringData> buyMaterial(@Query("userLineId")String userLineId, @Query("supplyListId") String supplyListId, @Query("num") int num);

    @GET("CarType/getInfoByCarTypeId")
    Call<ResponseData<Car>> getCar(@Query("car_type_id") int id);

    @GET("UserPosition/search")
    Call<ResponseData<Position>> getAllPosition(@Query("userLineId") int userLineId,@Query("pos") int pos);

    @GET("UserLine/getPersonInfo")
    Call<ResponseData<Person>> getPersonInfo(@Query("userPersonId")int userPersonId);

    @GET("index/addUserPosition")
    Call<ResponseData<Person>> addUserPosition(@Query("positionId") int positionId);
}
